import request from "../utils/request.js";

export async function addPhotoApi(photo) {
    return await request.post('/api/photo/addPhoto', photo)
}

export async function updatePhotoApi(photo) {
    return await request.post('/api/photo/updatePhoto', photo)
}

export async function deletePhotoApi(photoId) {
    return await request.post('/api/photo/deletePhoto', {}, {
        params: {
            photoId: photoId
        }
    })
}

export async function getPhotoListApi() {
    return await request.post('/api/photo/getPhotoList')
}

export async function getPhotoByNameApi(photoName) {
    return await request.post('/api/photo/getPhotoByName', {}, {
        params: {
            photoName: photoName
        }
    })
}